<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>

<center>
<h1>Course view</h1>

<table border="1">
    <tr>
        <td>Course:</td>
        <td><c:out value="${course.name}" /></td>
    </tr>

    <tr>
		<td>Discipline:</td>
		<td><c:out value="${course.discipline.shortName}" /></td>
	</tr>
    <tr>
        <td>Info:</td>
        <td><c:out value="${course.info}" /></td>
    </tr>

    <c:forEach var="lection" items="${course.lections}">
		<tr>
			<td><a href="lectionView.htm?id=${lection.id}"><c:out value="${lection.name}" /></a></td>
            <td><a href="lectionDelete.htm?id=${lection.id}">Delete</a></td>
        </tr>
	</c:forEach>
	<tr>
	    <td colspan="2">
	        <a href="<c:url value="/lectionEdit.htm?course=${course.id}"/>">Add lection</a>&nbsp;
	        <a href="<c:url value="/courseEdit.htm?id=${course.id}"/>">Edit</a>
	    </td>
    </tr>
</table>

</center>

